
import java.awt.Color;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Comedy Option
 */
public class RoomClickHandler implements MouseListener{

    @Override
    public void mouseClicked(MouseEvent e) {
        FloorView view = (FloorView)e.getComponent();
        RoomView room = view.findRoom(e.getPoint());
        if(room != null){
            if(view.currentRoom != null){
                view.currentRoom.setBgColor(Color.white);
            }
            view.currentRoom = room;
            room.setBgColor(Color.lightGray);
            view.repaint();
            EmpFacingView.getView().leftPanel.showRoomStuff(room.getRepRoom());
        }
        
    }

    @Override
    public void mousePressed(MouseEvent e) {
 
    }

    @Override
    public void mouseReleased(MouseEvent e) {
 
    }

    @Override
    public void mouseEntered(MouseEvent e) {
       
    }

    @Override
    public void mouseExited(MouseEvent e) {
   
    }
    
    
}
